This section describes the external interface that image compressor components must support. It also discusses the utility functions that the Image Compression Manager provides for use by compressors and decompressors.
This discussion has been divided into two parts. They discuss the image compressor component functions that are called by the Image Compression Manager. "Direct Functions" deals with image compressor component functions that are called by the Image Compression Manager in response to application requests. "Indirect Functions" discusses image compressor component functions that may be called by the Image Compression Manager at any time. The next section, "Image Compression Manager Utility Functions," defines a number of Image Compression Manager utility functions that are available to image compressor components.
Apple has defined a functional interface for image compressor components. For information about the functions your component must support, see the individual function descriptions that follow.
You can use the following constants to refer to the request codes for each of the functions that your component must support.
#define kImageCodecGetCodecInfoSelect 0x00 /*
ImageCodec
GetCodecInf */
#define kImageCodecGetCompressionTimeSelect 0x01 /*
ImageCodec
GetCompressionTime */
#define kImageCodecGetMaxCompressionSizeSelect 0x02 /*
ImageCodec
GetMaxCompressionSize */
#define kImageCodecPreCompressSelect 0x03 /*
ImageCodec
PreCompress */
#define kImageCodecBandCompressSelect 0x04 /*
ImageCodec
BandCompress */
#define kImageCodecPreDecompressSelect 0x05 /*
ImageCodec
PreDeCompress */
#define kImageCodecBandDecompressSelect 0x06 /*
ImageCodec
BandDeCompress */
#define kImageCodecBusySelect 0x07 /*
ImageCodec
SequenceBusy */
#define kImageCodecGetCompressedImageSizeSelect 0x08 /*
ImageCodec
GetCompressedImageSize */
#define kImageCodecGetSimilaritySelect 0x09 /*
ImageCodec
GetSimilarity */
#define kImageCodecTrimImageSelect 0x0A /*
ImageCodec
TrimImage */
Note
Code selectors 0 through 127 are reserved for use by Apple. Code selectors 128 through 191 are subtype specific. Code selectors 192 through 255 are vendor specific. Code selectors 256 through 32767 are available for general use. Negative selectors are reserved by the Component Manager.